package com.mytijian.mashang.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.mytijian.code.service.SendCodeService;

/**
 * Created by shjh on 2017/9/21.
 */
@Component
public class ReissueSendCodeJob implements SimpleJob {
    private Logger logger = LoggerFactory.getLogger(ReissueSendCodeJob.class);

    @Autowired
    private SendCodeService sendCodeService;

    @Override
    public void execute(ShardingContext shardingContext) {
        logger.info("补发未发送成功码发送任务执行开始 .........");
        try {
        	
        	// TODO 不要提交
//        	sendCodeService.reissueSendCode();
        }catch (Exception ex) {
            logger.warn("补发未发送成功码发送任务执行失败：", ex);
        }
        logger.info("补发未发送成功码发送任务执行结束 ...........");
    }
}
